package com.mdd.admin.validate.system;

import com.mdd.admin.validate.BaseParam;
import com.mdd.common.validator.annotation.IntegerContains;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SystemSignInConfingParam extends BaseParam {

    @NotNull(message = "enable参数缺失", groups = {create.class, update.class})
    @IntegerContains(values = {0, 1}, message = "enable参数值不在符合范围", groups = {create.class, update.class})
    private Integer enable;

    @NotNull(message = "固定奖励值", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "固定奖励不能少于0", groups = {create.class, update.class})
    private BigDecimal changeless;

    @NotNull(message = "积分奖励规则JSON", groups = {create.class, update.class})
    private String reward_rules_json;

    @NotNull(message = "奖励规则说明", groups = {create.class, update.class})
    private String rule_description;

}
